package com.woniu113.junk.user.mapper;

import com.woniu113.junk.user.model.AdminRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 蜡笔没了小新
 * @since 2024年10月16日
 */
@Mapper
public interface AdminRoleMapper extends BaseMapper<AdminRole> {
    @Select("select * from admin_role")
    List<AdminRole> selectRole();
    @Delete("delete from admin_role where role_id = #{id}")
    void deleteRole(@Param("id") Integer id);
    @Select("select role_type from admin_role where role_id = #{id}")
    String selectRoleNameById(@Param("id") Integer id);
}
